#pragma once

#include <MyFC/Widget.h>
#include <MyFC/Container.h>
#include <MyFC/Slider.h>
#include <MyFC/GlyphButton.h>
#include <MyFC/TextControl.h>
#include <MyFC/ColorBox.h>
#include "ZoomEdit.h"
#include "ZoomOut.h"
#include "ZoomSlider.h"
#include "ZoomIn.h"

#include "Types.h"

class ZoomView;

namespace My {

class Frame;
class DisplayPanel;

class BackgroundColorBox : public ColorBox
{
public:
	BackgroundColorBox();
	void SetView(ZoomView *);
public:
	virtual bool GetColor(COLORREF &) const;
	virtual void SetColor(COLORREF);
	virtual String Hint() const;
private:
	ZoomView *	m_pView;
};

class DLL_API DisplayPanel : public Container
{
public:
	DisplayPanel(Frame &);
	ZoomView * GetView() const;
	void SetView(ZoomView *);
	void AddExtraWidget(Widget *);
public:
	virtual CSize GetMinWindowSize() const;
	virtual CRect Bounds() const;
	virtual bool Visible() const;
	virtual void HandlePaint(CDC * pDC, const CRect & r);
	virtual void LayoutControls();
protected:
	Frame &				m_Frame;
	ZoomView *			m_pView;
	ZoomEdit			m_ZoomEdit;
	ZoomOut				m_ZoomOut;
	ZoomSlider			m_ZoomSlider;
	ZoomIn				m_ZoomIn;
	BackgroundColorBox	m_Background;
	std::vector<Widget *>	m_ExtraWidgets;
};

} // My